home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
476-500
/
disk_499
/
diglib
/
diglib.lzh
/
source
/
CURVEY.for
< prev
next >
Wrap
Text File
|
1991-04-13
|
1KB
|
45 lines
SUBROUTINE CURVEY(XMIN,XMAX,Y,NPTS,ISYMNO,SYMSIZ,NPBSYM)
IMPLICIT NONE
REAL*4 Y(NPTS)
C
C THIS SUBROUTINE TRACES THE LINE FROM X(1),Y(1) TO
C X(NPTS),Y(NPTS) WITH APPROPIATE CLIPPING.
C USE THIS ROUTINE WHEN CLIPPING IS DESIRED AND THE
C INDEPENDANT VARIABLE IS IMPLIED BY THE SUBSCRIPT
C USING EQUAL INTERVALS FROM XMIN TO XMAX.
C IT THEN ADDS THE DESIRED SYMBOL IN THE REQUIRED SIZE SPACED
C EVERY "NPBSYM" POINTS APART.
C
REAL*4 AREA(4),VX,VY,DX,XNEW
INTEGER I,IOLDLT
C
INCLUDE DIGLIB$KOM:GCLTYP.PRM
INCLUDE DIGLIB$KOM:PLTSIZ.PRM
C
CALL GSSCLP(XVSTRT,XVSTRT+XVLEN,YVSTRT,YVSTRT+YVLEN,AREA)
CALL SCALE(XMIN,Y(1),VX,VY)
CALL GSMOVE(VX,VY)
10 DX = (XMAX-XMIN)/(NPTS-1)
XNEW = XMIN
DO 100 I=2,NPTS
XNEW = XMIN + (I-1)*DX
CALL SCALE(XNEW,Y(I),VX,VY)
100 CALL GSDRAW(VX,VY)
C
C NOW ADD SYMBOLS IF DESIRED
C
IF (ISYMNO .LE. 0) GO TO 800
IOLDLT = ILNTYP
ILNTYP = 1
DO 200 I=1,NPTS,NPBSYM
XNEW = XMIN + (I-1)*DX
CALL SCALE(XNEW,Y(I),VX,VY)
CALL GSMOVE(VX,VY)
CALL SYMBOL(ISYMNO,SYMSIZ)
200 CONTINUE
ILNTYP = IOLDLT
800 CONTINUE
CALL GSRCLP(AREA)
RETURN
END